﻿using System;
using System.Collections.Generic;
using KKSG;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;

namespace XMainClient
{
	// Token: 0x02000C25 RID: 3109
	internal class XGuildResContentionBuffDocument : XDocComponent
	{
		// Token: 0x17003110 RID: 12560
		// (get) Token: 0x0600B022 RID: 45090 RVA: 0x00218FD0 File Offset: 0x002171D0
		public override uint ID
		{
			get
			{
				return XGuildResContentionBuffDocument.uuID;
			}
		}

		// Token: 0x17003111 RID: 12561
		// (get) Token: 0x0600B023 RID: 45091 RVA: 0x00218FE8 File Offset: 0x002171E8
		public static XGuildResContentionBuffDocument Doc
		{
			get
			{
				return XSingleton<XGame>.singleton.Doc.GetXComponent(XGuildResContentionBuffDocument.uuID) as XGuildResContentionBuffDocument;
			}
		}

		// Token: 0x17003112 RID: 12562
		// (get) Token: 0x0600B024 RID: 45092 RVA: 0x00219014 File Offset: 0x00217214
		public static GuildBuffTable GuildBuffData
		{
			get
			{
				return XGuildResContentionBuffDocument._guildBuffTable;
			}
		}

		// Token: 0x17003113 RID: 12563
		// (get) Token: 0x0600B025 RID: 45093 RVA: 0x0021902C File Offset: 0x0021722C
		public static GuildMineralStorage GuildMineralStorageTable
		{
			get
			{
				return XGuildResContentionBuffDocument._guildMineralStorageTable;
			}
		}

		// Token: 0x0600B026 RID: 45094 RVA: 0x00219043 File Offset: 0x00217243
		public static void Execute(OnLoadedCallback callback = null)
		{
			XGuildResContentionBuffDocument.AsyncLoader.AddTask("Table/GuildBuff", XGuildResContentionBuffDocument._guildBuffTable, false);
			XGuildResContentionBuffDocument.AsyncLoader.AddTask("Table/GuildMineralStorage", XGuildResContentionBuffDocument._guildMineralStorageTable, false);
			XGuildResContentionBuffDocument.AsyncLoader.Execute(callback);
		}

		// Token: 0x0600B027 RID: 45095 RVA: 0x00114ACA File Offset: 0x00112CCA
		public override void OnAttachToHost(XObject host)
		{
			base.OnAttachToHost(host);
		}

		// Token: 0x0600B028 RID: 45096 RVA: 0x00114AD5 File Offset: 0x00112CD5
		protected override void EventSubscribe()
		{
			base.EventSubscribe();
		}

		// Token: 0x0600B029 RID: 45097 RVA: 0x00114ADF File Offset: 0x00112CDF
		public override void OnDetachFromHost()
		{
			base.OnDetachFromHost();
		}

		// Token: 0x0600B02A RID: 45098 RVA: 0x000FEEFC File Offset: 0x000FD0FC
		protected override void OnReconnected(XReconnectedEventArgs arg)
		{
		}

		// Token: 0x0600B02B RID: 45099 RVA: 0x00114AE9 File Offset: 0x00112CE9
		public override void OnEnterSceneFinally()
		{
			base.OnEnterSceneFinally();
		}

		// Token: 0x17003114 RID: 12564
		// (get) Token: 0x0600B02C RID: 45100 RVA: 0x00219080 File Offset: 0x00217280
		// (set) Token: 0x0600B02D RID: 45101 RVA: 0x00219098 File Offset: 0x00217298
		public uint GuildBuffCDTime
		{
			get
			{
				return this._guildBuffCDTime;
			}
			set
			{
				this._guildBuffCDTime = value;
			}
		}

		// Token: 0x17003115 RID: 12565
		// (get) Token: 0x0600B02E RID: 45102 RVA: 0x002190A4 File Offset: 0x002172A4
		// (set) Token: 0x0600B02F RID: 45103 RVA: 0x002190BC File Offset: 0x002172BC
		public ulong GuildID
		{
			get
			{
				return this._guildID;
			}
			set
			{
				this._guildID = value;
			}
		}

		// Token: 0x17003116 RID: 12566
		// (get) Token: 0x0600B030 RID: 45104 RVA: 0x002190C8 File Offset: 0x002172C8
		// (set) Token: 0x0600B031 RID: 45105 RVA: 0x002190E0 File Offset: 0x002172E0
		public List<GuildBuffUsedRecordItem> MineUsedBuffRecordList
		{
			get
			{
				return this._guildBuffUsedRecords;
			}
			set
			{
				this._guildBuffUsedRecords = value;
			}
		}

		// Token: 0x17003117 RID: 12567
		// (get) Token: 0x0600B032 RID: 45106 RVA: 0x002190EC File Offset: 0x002172EC
		// (set) Token: 0x0600B033 RID: 45107 RVA: 0x00219104 File Offset: 0x00217304
		public uint GuildMaxResource
		{
			get
			{
				return this._guildMaxResource;
			}
			set
			{
				this._guildMaxResource = value;
			}
		}

		// Token: 0x17003118 RID: 12568
		// (get) Token: 0x0600B034 RID: 45108 RVA: 0x00219110 File Offset: 0x00217310
		// (set) Token: 0x0600B035 RID: 45109 RVA: 0x00219128 File Offset: 0x00217328
		public List<GuildBuffInfo> MyselfOwnedBuffs
		{
			get
			{
				return this._myselfOwnedBuffs;
			}
			set
			{
				this._myselfOwnedBuffs = value;
			}
		}

		// Token: 0x17003119 RID: 12569
		// (get) Token: 0x0600B036 RID: 45110 RVA: 0x00219134 File Offset: 0x00217334
		// (set) Token: 0x0600B037 RID: 45111 RVA: 0x0021914C File Offset: 0x0021734C
		public List<GuildUsingBuffInfo> MySelfActingBuffList
		{
			get
			{
				return this._mySelfActingBuffList;
			}
			set
			{
				this._mySelfActingBuffList = value;
			}
		}

		// Token: 0x1700311A RID: 12570
		// (get) Token: 0x0600B038 RID: 45112 RVA: 0x00219158 File Offset: 0x00217358
		// (set) Token: 0x0600B039 RID: 45113 RVA: 0x00219170 File Offset: 0x00217370
		public List<GuildBuffInfo> MyGuildOwnedBuffs
		{
			get
			{
				return this._myGuildOwnedBuffs;
			}
			set
			{
				this._myGuildOwnedBuffs = value;
			}
		}

		// Token: 0x0600B03A RID: 45114 RVA: 0x0021917C File Offset: 0x0021737C
		public GuildBuffTable.RowData GetGuildBuffDataByItemID(uint itemID)
		{
			for (int i = 0; i < XGuildResContentionBuffDocument._guildBuffTable.Table.Length; i++)
			{
				bool flag = XGuildResContentionBuffDocument._guildBuffTable.Table[i].itemid == itemID;
				if (flag)
				{
					return XGuildResContentionBuffDocument._guildBuffTable.Table[i];
				}
			}
			return null;
		}

		// Token: 0x0600B03B RID: 45115 RVA: 0x002191D4 File Offset: 0x002173D4
		public GuildBuffTable.RowData GetGuildBuffDataByBuffID(uint buffID)
		{
			for (int i = 0; i < XGuildResContentionBuffDocument._guildBuffTable.Table.Length; i++)
			{
				bool flag = XGuildResContentionBuffDocument._guildBuffTable.Table[i].id == buffID;
				if (flag)
				{
					return XGuildResContentionBuffDocument._guildBuffTable.Table[i];
				}
			}
			return null;
		}

		// Token: 0x0600B03C RID: 45116 RVA: 0x0021922C File Offset: 0x0021742C
		public GuildMineralStorage.RowData GetMineralStorageByID(uint id)
		{
			for (int i = 0; i < XGuildResContentionBuffDocument._guildMineralStorageTable.Table.Length; i++)
			{
				bool flag = XGuildResContentionBuffDocument._guildMineralStorageTable.Table[i].itemid == id;
				if (flag)
				{
					return XGuildResContentionBuffDocument._guildMineralStorageTable.Table[i];
				}
			}
			return null;
		}

		// Token: 0x0600B03D RID: 45117 RVA: 0x00219284 File Offset: 0x00217484
		public void SendGuildBuffReq(ulong guildID, uint itemID)
		{
			RpcC2M_UseGuildBuff rpcC2M_UseGuildBuff = new RpcC2M_UseGuildBuff();
			rpcC2M_UseGuildBuff.oArg.guildid = guildID;
			rpcC2M_UseGuildBuff.oArg.itemid = itemID;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2M_UseGuildBuff);
		}

		// Token: 0x0600B03E RID: 45118 RVA: 0x002192C0 File Offset: 0x002174C0
		public void SendPersonalBuffOpReq(ulong entityID, uint itemID, PersonalBuffOpType opType)
		{
			RpcC2G_ItemBuffOp rpcC2G_ItemBuffOp = new RpcC2G_ItemBuffOp();
			rpcC2G_ItemBuffOp.oArg.itemcount = 1U;
			rpcC2G_ItemBuffOp.oArg.itemid = itemID;
			rpcC2G_ItemBuffOp.oArg.op = (uint)opType;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ItemBuffOp);
		}

		// Token: 0x0600B03F RID: 45119 RVA: 0x00219308 File Offset: 0x00217508
		public void OnGetUseGuildBuffResult(UseGuildBuffArg oArg, UseGuildBuffRes oRes)
		{
			bool flag = oRes.error == ErrorCode.ERR_SUCCESS;
			if (flag)
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("BuffUseSuc"), "fece00");
				this._guildBuffCDTime = oRes.cd;
				DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshOwnedBuffItem(oArg.itemid, this._guildBuffCDTime);
			}
			else
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.error, "fece00");
			}
		}

		// Token: 0x0600B040 RID: 45120 RVA: 0x00219384 File Offset: 0x00217584
		public void OnGetPersonalBuffOperationResult(ItemBuffOpArg oArg, ItemBuffOpRes oRes)
		{
			bool flag = oRes.errorcode == ErrorCode.ERR_SUCCESS;
			if (flag)
			{
				bool flag2 = oArg.op == 0U;
				if (flag2)
				{
					this._myselfOwnedBuffs.Clear();
					for (int i = 0; i < oRes.itemid.Count; i++)
					{
						this._myselfOwnedBuffs.Add(new GuildBuffInfo
						{
							itemID = oRes.itemid[i],
							count = oRes.itemcount[i]
						});
					}
				}
				else
				{
					bool flag3 = oArg.op == 1U;
					if (flag3)
					{
						XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("BuffUseSuc"), "fece00");
						for (int j = 0; j < this._myselfOwnedBuffs.Count; j++)
						{
							bool flag4 = this._myselfOwnedBuffs[j].itemID == oArg.itemid;
							if (flag4)
							{
								bool flag5 = this._myselfOwnedBuffs[j].count <= 1U;
								if (flag5)
								{
									this._myselfOwnedBuffs.RemoveAt(j);
								}
								else
								{
									this._myselfOwnedBuffs[j].count -= 1U;
								}
								break;
							}
						}
						ItemBuffTable.RowData itembuffDataByID = XHomeCookAndPartyDocument.Doc.GetItembuffDataByID(oArg.itemid);
						bool flag6 = itembuffDataByID != null;
						if (flag6)
						{
							for (int k = 0; k < itembuffDataByID.Buffs.Count; k++)
							{
								BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)itembuffDataByID.Buffs[k, 0], (int)itembuffDataByID.Buffs[k, 1]);
								bool flag7 = buffData.BuffDuration > 0f;
								if (flag7)
								{
									bool flag8 = false;
									for (int l = 0; l < this._mySelfActingBuffList.Count; l++)
									{
										bool flag9 = (ulong)this._mySelfActingBuffList[l].buffID == (ulong)((long)buffData.BuffID);
										if (flag9)
										{
											this._mySelfActingBuffList[l].time = (uint)buffData.BuffDuration;
											flag8 = true;
											break;
										}
									}
									bool flag10 = !flag8;
									if (flag10)
									{
										this._mySelfActingBuffList.Add(new GuildUsingBuffInfo
										{
											buffID = (uint)buffData.BuffID,
											time = (uint)buffData.BuffDuration
										});
									}
								}
							}
						}
						bool flag11 = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.IsVisible();
						if (flag11)
						{
							DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshOwnedBuffItem(oArg.itemid, 0U);
							DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshMySelfActingBuff();
						}
					}
					else
					{
						bool flag12 = oArg.op == 2U;
						if (flag12)
						{
							this.MySelfActingBuffList.Clear();
							for (int m = 0; m < oRes.buffid.Count; m++)
							{
								this._mySelfActingBuffList.Add(new GuildUsingBuffInfo
								{
									buffID = oRes.buffid[m],
									time = oRes.lefttime[m]
								});
							}
							bool flag13 = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.IsVisible();
							if (flag13)
							{
								DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshMySelfActingBuff();
							}
						}
						else
						{
							bool flag14 = oArg.op == 3U;
							if (flag14)
							{
								bool flag15 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HORSE_RACE || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_HORSERACING;
								if (flag15)
								{
									XRaceDocument specificDocument = XDocuments.GetSpecificDocument<XRaceDocument>(XRaceDocument.uuID);
									specificDocument.UseDoodad(oArg, oRes);
								}
								else
								{
									bool flag16 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_SURVIVE;
									if (flag16)
									{
									}
								}
							}
						}
					}
				}
			}
			else
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.errorcode, "fece00");
			}
		}

		// Token: 0x0600B041 RID: 45121 RVA: 0x00219754 File Offset: 0x00217954
		public void OnGetBuffAllInfo(ResWarGuildBrief res)
		{
			bool flag = res != null && res.error == ErrorCode.ERR_SUCCESS;
			if (flag)
			{
				this.GuildBuffCDTime = res.cardcd;
				this.GuildID = res.guildid;
				this.GuildMaxResource = (uint)XSingleton<XGlobalConfig>.singleton.GetInt("GuildResMax");
				List<GuildBuffItem> item = res.item;
				bool flag2 = item != null;
				if (flag2)
				{
					this.UpdateOwnedBuffList(item);
				}
				this.OnGetGuildInfoList(res.rankinfo);
				this.OnGetGuildBuffList(res.buffinfo);
				this.UpdateBuffRecords(res.chatinfo);
			}
		}

		// Token: 0x0600B042 RID: 45122 RVA: 0x002197E8 File Offset: 0x002179E8
		public WarResGuildInfo GetPKGuildInfos(int index)
		{
			bool flag = index < this._guildInfoList.Count;
			WarResGuildInfo result;
			if (flag)
			{
				result = this._guildInfoList[index];
			}
			else
			{
				result = null;
			}
			return result;
		}

		// Token: 0x0600B043 RID: 45123 RVA: 0x0021981C File Offset: 0x00217A1C
		public List<WarResGuildInfo> GetAllGuildInfos()
		{
			return this._guildInfoList;
		}

		// Token: 0x0600B044 RID: 45124 RVA: 0x00219834 File Offset: 0x00217A34
		public List<GuildUsingBuffInfo> GetGuildUsedBuffList(ulong guildID)
		{
			List<GuildUsingBuffInfo> result = null;
			foreach (KeyValuePair<ulong, List<GuildUsingBuffInfo>> keyValuePair in this._guildsBuffedInfos)
			{
				bool flag = keyValuePair.Key == guildID;
				if (flag)
				{
					result = this._guildsBuffedInfos[keyValuePair.Key];
					return result;
				}
			}
			return result;
		}

		// Token: 0x0600B045 RID: 45125 RVA: 0x002198B8 File Offset: 0x00217AB8
		public GuildBuffInfo GetGuildOwnedSomeCardInfo(uint itemID)
		{
			for (int i = 0; i < this.MyGuildOwnedBuffs.Count; i++)
			{
				bool flag = this.MyGuildOwnedBuffs[i].itemID == itemID && this.MyGuildOwnedBuffs[i].count > 0U;
				if (flag)
				{
					return this.MyGuildOwnedBuffs[i];
				}
			}
			return null;
		}

		// Token: 0x0600B046 RID: 45126 RVA: 0x00219928 File Offset: 0x00217B28
		public GuildBuffInfo GetMyOwnedSomeCardInfo(uint itemID)
		{
			for (int i = 0; i < this._myselfOwnedBuffs.Count; i++)
			{
				bool flag = this._myselfOwnedBuffs[i].itemID == itemID;
				if (flag)
				{
					return this._myselfOwnedBuffs[i];
				}
			}
			return null;
		}

		// Token: 0x0600B047 RID: 45127 RVA: 0x0021997E File Offset: 0x00217B7E
		public void StartCDTimer()
		{
			this.StopCDTimer();
			this._guildCdTimerID = XSingleton<XTimerMgr>.singleton.SetTimerAccurate(1f, new XTimerMgr.AccurateElapsedEventHandler(this.RefreshCardCD), null);
		}

		// Token: 0x0600B048 RID: 45128 RVA: 0x002199AA File Offset: 0x00217BAA
		public void StopCDTimer()
		{
			XSingleton<XTimerMgr>.singleton.KillTimer(this._guildCdTimerID);
			this._guildCdTimerID = 0U;
		}

		// Token: 0x0600B049 RID: 45129 RVA: 0x002199C5 File Offset: 0x00217BC5
		private void RefreshCardCD(object param, float delay)
		{
			this.MinusGuildBuffCDTime();
			this.RefreshUICD();
			this.StartCDTimer();
		}

		// Token: 0x0600B04A RID: 45130 RVA: 0x002199E0 File Offset: 0x00217BE0
		private void RefreshUICD()
		{
			bool flag = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.IsVisible();
			if (flag)
			{
				DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshGuildBuffCD();
				DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshMySelfActingBuff();
			}
			GuildBuffOperationHandler guildBuffHandler = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.GuildBuffHandler;
			bool flag2 = guildBuffHandler != null && guildBuffHandler.IsVisible();
			if (flag2)
			{
				guildBuffHandler.RefreshCardCd();
			}
		}

		// Token: 0x0600B04B RID: 45131 RVA: 0x00219A38 File Offset: 0x00217C38
		private void MinusGuildBuffCDTime()
		{
			this._guildBuffCDTime = ((this._guildBuffCDTime > 0U) ? (this._guildBuffCDTime - 1U) : 0U);
			foreach (List<GuildUsingBuffInfo> list in this._guildsBuffedInfos.Values)
			{
				for (int i = 0; i < list.Count; i++)
				{
					list[i].time = ((list[i].time > 0U) ? (list[i].time - 1U) : 0U);
				}
			}
			for (int j = this._mySelfActingBuffList.Count - 1; j >= 0; j--)
			{
				bool flag = this._mySelfActingBuffList[j].time == 0U;
				if (flag)
				{
					this._mySelfActingBuffList.RemoveAt(j);
				}
				else
				{
					this._mySelfActingBuffList[j].time -= 1U;
				}
			}
		}

		// Token: 0x0600B04C RID: 45132 RVA: 0x00219B58 File Offset: 0x00217D58
		private void UpdateOwnedBuffList(List<GuildBuffItem> buffItems)
		{
			bool flag = buffItems == null;
			if (!flag)
			{
				this.MyGuildOwnedBuffs.Clear();
				for (int i = 0; i < buffItems.Count; i++)
				{
					this.MyGuildOwnedBuffs.Add(new GuildBuffInfo
					{
						itemID = buffItems[i].itemid,
						count = buffItems[i].count
					});
				}
			}
		}

		// Token: 0x0600B04D RID: 45133 RVA: 0x00219BC8 File Offset: 0x00217DC8
		private void UpdateBuffRecords(List<KKSG.ChatInfo> usedBuffs)
		{
			bool flag = usedBuffs != null;
			if (flag)
			{
				this._guildBuffUsedRecords.Clear();
				XChatDocument specificDocument = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
				for (int i = 0; i < usedBuffs.Count; i++)
				{
					this._guildBuffUsedRecords.Add(new GuildBuffUsedRecordItem
					{
						MainMessage = specificDocument.ProcessText(usedBuffs[i])
					});
				}
			}
		}

		// Token: 0x0600B04E RID: 45134 RVA: 0x00219C34 File Offset: 0x00217E34
		internal void OnGetGuildBuffList(List<GuildBuffSimpleInfo> buffs)
		{
			bool flag = buffs == null;
			if (!flag)
			{
				this._guildsBuffedInfos.Clear();
				for (int i = 0; i < buffs.Count; i++)
				{
					GuildBuffSimpleInfo guildBuffSimpleInfo = buffs[i];
					this._guildsBuffedInfos.Add(guildBuffSimpleInfo.guildid, new List<GuildUsingBuffInfo>());
					for (int j = 0; j < guildBuffSimpleInfo.buff.Count; j++)
					{
						this._guildsBuffedInfos[guildBuffSimpleInfo.guildid].Add(new GuildUsingBuffInfo
						{
							buffID = guildBuffSimpleInfo.buff[j].id,
							time = guildBuffSimpleInfo.buff[j].time
						});
					}
				}
				bool flag2 = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.IsVisible();
				if (flag2)
				{
					DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshTopRightBuffs();
				}
			}
		}

		// Token: 0x0600B04F RID: 45135 RVA: 0x00219D1C File Offset: 0x00217F1C
		internal void OnGetGuildInfoList(ResWarRankSimpleInfo infos)
		{
			bool flag = infos.rank == null;
			if (!flag)
			{
				this._guildInfoList.Clear();
				List<ResWarRank> rank = infos.rank;
				for (int i = 0; i < rank.Count; i++)
				{
					ResWarRank resWarRank = rank[i];
					WarResGuildInfo warResGuildInfo = new WarResGuildInfo
					{
						guildID = resWarRank.id,
						guildName = resWarRank.name,
						resValue = resWarRank.value,
						guildIcon = resWarRank.icon
					};
					this.GuildMaxResource = Math.Max(this.GuildMaxResource, resWarRank.value);
					this._guildInfoList.Add(warResGuildInfo);
					bool flag2 = warResGuildInfo.guildID == this._guildID;
					if (flag2)
					{
						this._guildInfoList[i] = this._guildInfoList[0];
						this._guildInfoList[0] = warResGuildInfo;
					}
				}
			}
		}

		// Token: 0x0600B050 RID: 45136 RVA: 0x00219E14 File Offset: 0x00218014
		internal void OnGetOwnedGuildBuffList(PtcM2C_GuildBuffSimpleItemNtf roPtc)
		{
			bool flag = roPtc.Data != null;
			if (flag)
			{
				bool flag2 = roPtc.Data.guildid == this._guildID;
				if (flag2)
				{
					this.UpdateOwnedBuffList(roPtc.Data.item);
					this.UpdateBuffRecords(roPtc.Data.chatinfo);
					bool flag3 = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.IsVisible();
					if (flag3)
					{
						DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshBuffsRecord();
					}
				}
			}
		}

		// Token: 0x0600B051 RID: 45137 RVA: 0x00219E8C File Offset: 0x0021808C
		public void OnGetGuildResUpdate(ResWarMineData data)
		{
			bool flag = data != null;
			if (flag)
			{
				for (int i = 0; i < this._guildInfoList.Count; i++)
				{
					bool flag2 = this._guildInfoList[i].guildID == data.guildid;
					if (flag2)
					{
						this.GuildMaxResource = Math.Max(this.GuildMaxResource, data.mine);
						this._guildInfoList[i].resValue = data.mine;
						bool flag3 = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.IsVisible();
						if (flag3)
						{
							DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.RefreshTopRightBuffs();
						}
						break;
					}
				}
			}
		}

		// Token: 0x0600B052 RID: 45138 RVA: 0x00219F30 File Offset: 0x00218130
		public void OnGetGuildBuffCD(GuildBuffCDParam data)
		{
			this._guildBuffCDTime = data.param;
			bool flag = this._guildBuffCDTime > 0U;
			if (flag)
			{
				GuildBuffOperationHandler guildBuffHandler = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.GuildBuffHandler;
				bool flag2 = guildBuffHandler != null && guildBuffHandler.IsVisible();
				if (flag2)
				{
					guildBuffHandler.FoldByHasGuildBuffCd();
					guildBuffHandler.RefreshCardCd();
				}
			}
		}

		// Token: 0x04004380 RID: 17280
		public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("GuildResContentionBuffDocument");

		// Token: 0x04004381 RID: 17281
		public static XTableAsyncLoader AsyncLoader = new XTableAsyncLoader();

		// Token: 0x04004382 RID: 17282
		private static GuildBuffTable _guildBuffTable = new GuildBuffTable();

		// Token: 0x04004383 RID: 17283
		private static GuildMineralStorage _guildMineralStorageTable = new GuildMineralStorage();

		// Token: 0x04004384 RID: 17284
		private List<GuildBuffInfo> _myGuildOwnedBuffs = new List<GuildBuffInfo>();

		// Token: 0x04004385 RID: 17285
		private List<GuildBuffInfo> _myselfOwnedBuffs = new List<GuildBuffInfo>();

		// Token: 0x04004386 RID: 17286
		private List<GuildUsingBuffInfo> _mySelfActingBuffList = new List<GuildUsingBuffInfo>();

		// Token: 0x04004387 RID: 17287
		private List<GuildBuffUsedRecordItem> _guildBuffUsedRecords = new List<GuildBuffUsedRecordItem>();

		// Token: 0x04004388 RID: 17288
		private List<WarResGuildInfo> _guildInfoList = new List<WarResGuildInfo>();

		// Token: 0x04004389 RID: 17289
		private Dictionary<ulong, List<GuildUsingBuffInfo>> _guildsBuffedInfos = new Dictionary<ulong, List<GuildUsingBuffInfo>>();

		// Token: 0x0400438A RID: 17290
		private uint _guildBuffCDTime = 0U;

		// Token: 0x0400438B RID: 17291
		private ulong _guildID = 0UL;

		// Token: 0x0400438C RID: 17292
		private uint _guildCdTimerID = 0U;

		// Token: 0x0400438D RID: 17293
		private uint _guildMaxResource = 1U;
	}
}
